package cn.demoncat;

import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Neo4j配置
 *
 * @author 延晓磊
 * @since 2021年07月06日
 */
// 扫描Entity：解决启动异常 Neo4jMappingContext - No class information found in OGM meta-data
@EntityScan({"cn.demoncat.test.neo.node"})
// 扫描Repository：解决启动异常 Neo4jPersistentProperty - Owning ClassInfo is null for property
@EnableNeo4jRepositories({"cn.demoncat.test.neo.dao"})
// 支持事务(@Transactional，会与Mysql的事务冲突)
@EnableTransactionManagement
// 配置类(spring.xml-beans)
@Configuration
public class NeoConfig {

}
